﻿using DarkSKL_Core.MongoDBModules.Models;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace Dark_Core_Server.Models.File
{
    /// <summary>
    /// 文件文档
    /// </summary>
    public class FileDocument : DocumentUnit
    {
        /// <summary>
        /// 文件大小
        /// </summary>
        [BsonElement("Size")]
        [BsonRepresentation(BsonType.Int64)]
        public long Size { set; get; }

        /// <summary>
        /// 文件原始URL地址
        /// </summary>
        [BsonElement("OriginUrl")]
        [BsonRepresentation(BsonType.String)]
        public string OriginUrl { set; get; }
        /// <summary>
        /// 文件MD5值
        /// </summary>
        [BsonElement("MD5")]
        [BsonRepresentation(BsonType.String)]
        public string MD5 { set; get; }
        /// <summary>
        /// 文件类型
        /// </summary>
        [BsonElement("Type")]
        [BsonRepresentation(BsonType.String)]
        public string Type { set; get; }
        /// <summary>
        /// 文件COS(腾讯云COS对象存储) URL地址
        /// </summary>
        [BsonElement("COSUrl")]
        [BsonRepresentation(BsonType.String)]
        public string COSUrl { set; get; }
        /// <summary>
        /// 文件ETag(腾讯云COS对象存储) ETag值
        /// </summary>
        [BsonElement("COSETag")]
        [BsonRepresentation(BsonType.String)]
        public string COSETag { set; get; }
        /// <summary>
        /// 文件COS(腾讯云COS对象存储) Bucket名称
        /// </summary>
        [BsonElement("COSBucket")]
        [BsonRepresentation(BsonType.String)]
        public string COSBucket { set; get; }

        /// <summary>
        /// COS(腾讯云COS对象存储) ObjectKey
        /// </summary>
        [BsonElement("COSObjectKey")]
        [BsonRepresentation(BsonType.String)]
        public string COSObjectKey
        {
            set;
            get;
        }
    }
}
